package com.mijie.homi.common.domain;

import net.sf.json.JSONArray;
import net.sf.json.JSONObject;

public class SearchResult {

	public static int INDEX_EXPIRE = 412;
	public static int SUCCESS = 200;
	
	private int code = SUCCESS;
	private JSONArray result ;
	
	public int getCode() {
		return code;
	}
	public void setCode(int code) {
		this.code = code;
	}
	public JSONArray getResult() {
		return result;
	}
	public void setResult(JSONArray result) {
		this.result = result;
	}
	
	public String toJSON(){
		JSONObject json = new JSONObject();
		json.accumulate("code", code);
		json.accumulate("result", result);
		return json.toString();
	}
}
